Skip to content

fix: wrap empty cleaning record responses as parsing errors - #1034

Open
hCoureau wants to merge 1 commit into
Python-roborock:mainfrom
hCoureau:fix/empty-clean-record-parsing
Open

hCoureau wants to merge 1 commit into
Python-roborock:mainfrom
hCoureau:fix/empty-clean-record-parsing

Conversation

@hCoureau

Copy link
Copy Markdown
Contributor

When get_clean_record receives [] or [[]], indexing the empty list raises IndexError outside the public parsing-exception boundary. Reject the empty record with ValueError so callers receive RoborockParsingException with the original command and payload context.

Add public-trait regressions for both empty shapes and compatibility cases for wrapped dictionaries and multi-phase replies. The tests use simulated responses; the six records I captured from my Qrevo 2 Pro were nonempty. Multi-phase aggregation behavior is a separate existing issue.

Validation: 2,283 tests passed on each of Python 3.11 and 3.14; pre-commit, commitlint and source/wheel builds passed. The three bug fixes combined with #1028–#1030 pass 2,310 tests on each Python version.

Related to #1018.

@hCoureau
hCoureau marked this pull request as ready for review November 11, 2026 19:43

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant